/**
 * 验证方式
 */
export enum VerifyMethod {
  EMAIL = 'email',
  PHONE_NUMBER = 'phoneNumber',
}

/**
 * 验证类型
 */
export enum VerifyType {
  REGISTER = 'register',
  RESET_PASSWORD = 'resetPassword',
  LOGIN = 'login',
  BIND_PHONE_NUMBER = 'bindPhoneNumber',
  BIND_EMAIL = 'bindEmail',
}

export const VerifyTypeTexts = {
  [VerifyType.REGISTER]: '用户注册',
  [VerifyType.RESET_PASSWORD]: '重置密码',
  [VerifyType.LOGIN]: '登录',
  [VerifyType.BIND_PHONE_NUMBER]: '绑定手机号',
  [VerifyType.BIND_EMAIL]: '绑定邮箱',
};

export enum AccountErrorKey {
  EXIST = 'account.exist', // 用户已存在
  NOT_EXIST = 'account.notExist', // 用户不存在
  ACCOUNT_OR_PASSWORD_ERROR = 'account.accountOrPasswordError', // 账号或密码错误
  VERIFY_CODE_ERROR = 'account.verifyCodeError', // 验证码错误
  PASSWORD_ERROR = 'account.passwordError', // 密码错误
  PASSWORD_MIN_LENGTH_ERROR = 'account.passwordNotLessThan8', // 密码最小长度格式错误
  PASSWORD_NOT_EMPTY = 'account.passwordNotEmpty', // 密码不能为空
  EMAIL_FORMAT_ERROR = 'account.emailFormatError', // 邮箱格式错误
  EMAIL_NOT_EMPTY = 'account.emailNotEmpty', // 邮箱不能为空,
  USERNAME_NOT_EMPTY = 'account.usernameNotEmpty', // 用户名不能为空
  USERNAME_FORMAT_ERROR = 'account.usernameFormatError', // 用户名字符长度格式错误
  PASSWORD_STRENGTH = 'account.passwordStrength', // 密码强度不足
}
